/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package fasea.search.documents;

import fasea.index.filehandler.FileHandlerException;
import javax.swing.Icon;
import javax.swing.ImageIcon;

/**
 *
 * @author WolframL
 */
public class PDFDocument extends Document{

    public PDFDocument(org.apache.lucene.document.Document document) {
        setDocument(document);
    }
    
    @Override
    public Icon getThumbnail() throws FileHandlerException {
        byte[] bytes = document.getBinaryValue("thumbnail");
        if (bytes != null) {
            return new ImageIcon(bytes);
        } else {
            return super.getThumbnail();
        }
    }

    @Override
    public String getFragment() {
        return "";
    }

    
}
